package cn.tedu.mybatisproxydemo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface DemoMapper {
    @Select("select 'Hello World!'")
    String hello();
    //
    //      select count(*) from user where id<?
    @Select("select count(*) from ${table} where id<#{id}")
    Integer demo(@Param("table") String table, @Param("id") Integer id);

    @Select("${sql}")
    String sqlDemo(String sql);
}
